﻿@page "/Permission/RoleMenu"
<Text>请选择 @DataSource.RoleName 可访问的菜单</Text>
<Tree
      Style="margin-top:20px"
      TItem="ViewMenu"
      BlockNode
      ShowIcon DataSource="ViewMenus"
      TitleExpression="x => x.DataItem.MenuName"
      ChildrenExpression="x => x.DataItem.Children"
      IconExpression="x => x.DataItem.Icon"
      IsLeafExpression="x => x.DataItem.Children?.Count == 0"
      KeyExpression="x => x.DataItem.Id.ToString()">
    <TitleIconTemplate Context="node">
        <Checkbox @bind-Checked="node.DataItem.IsPermission"></Checkbox>
    </TitleIconTemplate>
</Tree>